package cn.kow.kmall.core.exception;

import cn.kow.kmall.core.response.BaseResultInfo;

/**
 * service层异常
 * @Author: lijun
 * @Date: 2018/9/11 10:49
 */
public class ServiceException extends RuntimeException{

    private Integer code;

    public ServiceException() {
        super();
    }

    public ServiceException(Integer code, String message) {
        super(message);
        this.code = code;
    }

    public ServiceException(BaseResultInfo result) {
        super(result.getMessage());
        this.code = result.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
